package com.weixing.mall.provider.controller.front;

import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.base.wrapper.ResultUtil;
import com.weixing.mall.util.shareCode.ShareCodeUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ShareCodeController
 * @Description TODO <br/>
 * @Author gjq
 * @Modified By:
 * @Date 2019/9/19
 * @Version 1.0
 **/
@RestController
@RequestMapping("shareCode")
@Api(value = "邀请码api",tags = "邀请码")
public class ShareCodeController {


    @ApiOperation(value = "获取邀请码")
    @GetMapping("")
    public Result getShareCode(int id){
        return ResultUtil.success(ShareCodeUtil.encode(id));
    }
}
